#include <stdio.h>
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>


static void sig_alarm(int signo) {
	signal(SIGALRM, sig_alarm);
	if (signo == SIGALRM) {
		printf("pid=%d, received signal %d,ignore\n", getpid(), signo);
	}
	alarm(1);
}

int main(void) {
	signal(SIGALRM, sig_alarm);
	alarm(1);
	while (1)
		pause();
}
